home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpconnect / nsIScriptError.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  218 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptError.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptError_h__
  6. #define __gen_nsIScriptError_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIConsoleMessage_h__
  14. #include "nsIConsoleMessage.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIScriptError */
  23. #define NS_ISCRIPTERROR_IID_STR "b0196fc7-1913-441a-882a-453c0d8b89b8"
  24.  
  25. #define NS_ISCRIPTERROR_IID \
  26.   {0xb0196fc7, 0x1913, 0x441a, \
  27.     { 0x88, 0x2a, 0x45, 0x3c, 0x0d, 0x8b, 0x89, 0xb8 }}
  28.  
  29. class NS_NO_VTABLE nsIScriptError : public nsIConsoleMessage {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTERROR_IID)
  33.  
  34.   /** pseudo-flag for default case */
  35.   enum { errorFlag = 0U };
  36.  
  37.   /** message is warning */
  38.   enum { warningFlag = 1U };
  39.  
  40.   /** exception was thrown for this case - exception-aware hosts can ignore */
  41.   enum { exceptionFlag = 2U };
  42.  
  43.   /** error or warning is due to strict option */
  44.   enum { strictFlag = 4U };
  45.  
  46.   /**
  47.      * The error message without any context/line number information.
  48.      *
  49.      * @note nsIConsoleMessage.message will return the error formatted
  50.      *       with file/line information.
  51.      */
  52.   /* readonly attribute AString errorMessage; */
  53.   NS_IMETHOD GetErrorMessage(nsAString & aErrorMessage) = 0;
  54.  
  55.   /* readonly attribute AString sourceName; */
  56.   NS_IMETHOD GetSourceName(nsAString & aSourceName) = 0;
  57.  
  58.   /* readonly attribute AString sourceLine; */
  59.   NS_IMETHOD GetSourceLine(nsAString & aSourceLine) = 0;
  60.  
  61.   /* readonly attribute PRUint32 lineNumber; */
  62.   NS_IMETHOD GetLineNumber(PRUint32 *aLineNumber) = 0;
  63.  
  64.   /* readonly attribute PRUint32 columnNumber; */
  65.   NS_IMETHOD GetColumnNumber(PRUint32 *aColumnNumber) = 0;
  66.  
  67.   /* readonly attribute PRUint32 flags; */
  68.   NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0;
  69.  
  70.   /**
  71.      * Categories I know about -
  72.      * XUL javascript
  73.      * content javascript (both of these from nsDocShell, currently)
  74.      * component javascript (errors in JS components)
  75.      */
  76.   /* readonly attribute string category; */
  77.   NS_IMETHOD GetCategory(char * *aCategory) = 0;
  78.  
  79.   /* void init (in wstring message, in wstring sourceName, in wstring sourceLine, in PRUint32 lineNumber, in PRUint32 columnNumber, in PRUint32 flags, in string category); */
  80.   NS_IMETHOD Init(const PRUnichar *message, const PRUnichar *sourceName, const PRUnichar *sourceLine, PRUint32 lineNumber, PRUint32 columnNumber, PRUint32 flags, const char *category) = 0;
  81.  
  82.   /* AUTF8String toString (); */
  83.   NS_IMETHOD ToString(nsACString & _retval) = 0;
  84.  
  85. };
  86.  
  87. /* Use this macro when declaring classes that implement this interface. */
  88. #define NS_DECL_NSISCRIPTERROR \
  89.   NS_IMETHOD GetErrorMessage(nsAString & aErrorMessage); \
  90.   NS_IMETHOD GetSourceName(nsAString & aSourceName); \
  91.   NS_IMETHOD GetSourceLine(nsAString & aSourceLine); \
  92.   NS_IMETHOD GetLineNumber(PRUint32 *aLineNumber); \
  93.   NS_IMETHOD GetColumnNumber(PRUint32 *aColumnNumber); \
  94.   NS_IMETHOD GetFlags(PRUint32 *aFlags); \
  95.   NS_IMETHOD GetCategory(char * *aCategory); \
  96.   NS_IMETHOD Init(const PRUnichar *message, const PRUnichar *sourceName, const PRUnichar *sourceLine, PRUint32 lineNumber, PRUint32 columnNumber, PRUint32 flags, const char *category); \
  97.   NS_IMETHOD ToString(nsACString & _retval); 
  98.  
  99. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  100. #define NS_FORWARD_NSISCRIPTERROR(_to) \
  101.   NS_IMETHOD GetErrorMessage(nsAString & aErrorMessage) { return _to GetErrorMessage(aErrorMessage); } \
  102.   NS_IMETHOD GetSourceName(nsAString & aSourceName) { return _to GetSourceName(aSourceName); } \
  103.   NS_IMETHOD GetSourceLine(nsAString & aSourceLine) { return _to GetSourceLine(aSourceLine); } \
  104.   NS_IMETHOD GetLineNumber(PRUint32 *aLineNumber) { return _to GetLineNumber(aLineNumber); } \
  105.   NS_IMETHOD GetColumnNumber(PRUint32 *aColumnNumber) { return _to GetColumnNumber(aColumnNumber); } \
  106.   NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \
  107.   NS_IMETHOD GetCategory(char * *aCategory) { return _to GetCategory(aCategory); } \
  108.   NS_IMETHOD Init(const PRUnichar *message, const PRUnichar *sourceName, const PRUnichar *sourceLine, PRUint32 lineNumber, PRUint32 columnNumber, PRUint32 flags, const char *category) { return _to Init(message, sourceName, sourceLine, lineNumber, columnNumber, flags, category); } \
  109.   NS_IMETHOD ToString(nsACString & _retval) { return _to ToString(_retval); } 
  110.  
  111. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  112. #define NS_FORWARD_SAFE_NSISCRIPTERROR(_to) \
  113.   NS_IMETHOD GetErrorMessage(nsAString & aErrorMessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetErrorMessage(aErrorMessage); } \
  114.   NS_IMETHOD GetSourceName(nsAString & aSourceName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceName(aSourceName); } \
  115.   NS_IMETHOD GetSourceLine(nsAString & aSourceLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceLine(aSourceLine); } \
  116.   NS_IMETHOD GetLineNumber(PRUint32 *aLineNumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLineNumber(aLineNumber); } \
  117.   NS_IMETHOD GetColumnNumber(PRUint32 *aColumnNumber) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColumnNumber(aColumnNumber); } \
  118.   NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  119.   NS_IMETHOD GetCategory(char * *aCategory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCategory(aCategory); } \
  120.   NS_IMETHOD Init(const PRUnichar *message, const PRUnichar *sourceName, const PRUnichar *sourceLine, PRUint32 lineNumber, PRUint32 columnNumber, PRUint32 flags, const char *category) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(message, sourceName, sourceLine, lineNumber, columnNumber, flags, category); } \
  121.   NS_IMETHOD ToString(nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } 
  122.  
  123. #if 0
  124. /* Use the code below as a template for the implementation class for this interface. */
  125.  
  126. /* Header file */
  127. class nsScriptError : public nsIScriptError
  128. {
  129. public:
  130.   NS_DECL_ISUPPORTS
  131.   NS_DECL_NSISCRIPTERROR
  132.  
  133.   nsScriptError();
  134.  
  135. private:
  136.   ~nsScriptError();
  137.  
  138. protected:
  139.   /* additional members */
  140. };
  141.  
  142. /* Implementation file */
  143. NS_IMPL_ISUPPORTS1(nsScriptError, nsIScriptError)
  144.  
  145. nsScriptError::nsScriptError()
  146. {
  147.   /* member initializers and constructor code */
  148. }
  149.  
  150. nsScriptError::~nsScriptError()
  151. {
  152.   /* destructor code */
  153. }
  154.  
  155. /* readonly attribute AString errorMessage; */
  156. NS_IMETHODIMP nsScriptError::GetErrorMessage(nsAString & aErrorMessage)
  157. {
  158.     return NS_ERROR_NOT_IMPLEMENTED;
  159. }
  160.  
  161. /* readonly attribute AString sourceName; */
  162. NS_IMETHODIMP nsScriptError::GetSourceName(nsAString & aSourceName)
  163. {
  164.     return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166.  
  167. /* readonly attribute AString sourceLine; */
  168. NS_IMETHODIMP nsScriptError::GetSourceLine(nsAString & aSourceLine)
  169. {
  170.     return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172.  
  173. /* readonly attribute PRUint32 lineNumber; */
  174. NS_IMETHODIMP nsScriptError::GetLineNumber(PRUint32 *aLineNumber)
  175. {
  176.     return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178.  
  179. /* readonly attribute PRUint32 columnNumber; */
  180. NS_IMETHODIMP nsScriptError::GetColumnNumber(PRUint32 *aColumnNumber)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* readonly attribute PRUint32 flags; */
  186. NS_IMETHODIMP nsScriptError::GetFlags(PRUint32 *aFlags)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* readonly attribute string category; */
  192. NS_IMETHODIMP nsScriptError::GetCategory(char * *aCategory)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* void init (in wstring message, in wstring sourceName, in wstring sourceLine, in PRUint32 lineNumber, in PRUint32 columnNumber, in PRUint32 flags, in string category); */
  198. NS_IMETHODIMP nsScriptError::Init(const PRUnichar *message, const PRUnichar *sourceName, const PRUnichar *sourceLine, PRUint32 lineNumber, PRUint32 columnNumber, PRUint32 flags, const char *category)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* AUTF8String toString (); */
  204. NS_IMETHODIMP nsScriptError::ToString(nsACString & _retval)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* End of implementation class template. */
  210. #endif
  211.  
  212. #define NS_SCRIPTERROR_CLASSNAME "Script Error"
  213. #define NS_SCRIPTERROR_CID \
  214. { 0xe38e53b9, 0x5bb0, 0x456a, { 0xb5, 0x53, 0x57, 0x93, 0x70, 0xcb, 0x15, 0x67 }}
  215. #define NS_SCRIPTERROR_CONTRACTID "@mozilla.org/scripterror;1"
  216.  
  217. #endif /* __gen_nsIScriptError_h__ */
  218.